package com.crm.custinfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.crm.custinfo.mapper.CustBlackListMapper;
import com.crm.custinfo.domain.CustBlackList;
import com.crm.custinfo.service.ICustBlackListService;

/**
 * 黑名单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-17
 */
@Service
public class CustBlackListServiceImpl implements ICustBlackListService 
{
    @Autowired
    private CustBlackListMapper custBlackListMapper;

    /**
     * 查询黑名单
     * 
     * @param id 黑名单主键
     * @return 黑名单
     */
    @Override
    public CustBlackList selectCustBlackListById(Long id)
    {
        return custBlackListMapper.selectCustBlackListById(id);
    }

    /**
     * 查询黑名单列表
     * 
     * @param custBlackList 黑名单
     * @return 黑名单
     */
    @Override
    public List<CustBlackList> selectCustBlackListList(CustBlackList custBlackList)
    {
        return custBlackListMapper.selectCustBlackListList(custBlackList);
    }

    /**
     * 新增黑名单
     * 
     * @param custBlackList 黑名单
     * @return 结果
     */
    @Override
    public int insertCustBlackList(CustBlackList custBlackList)
    {
        custBlackList.setCreateTime(DateUtils.getNowDate());
        return custBlackListMapper.insertCustBlackList(custBlackList);
    }

    /**
     * 修改黑名单
     * 
     * @param custBlackList 黑名单
     * @return 结果
     */
    @Override
    public int updateCustBlackList(CustBlackList custBlackList)
    {
        return custBlackListMapper.updateCustBlackList(custBlackList);
    }

    /**
     * 批量删除黑名单
     * 
     * @param ids 需要删除的黑名单主键
     * @return 结果
     */
    @Override
    public int deleteCustBlackListByIds(Long[] ids)
    {
        return custBlackListMapper.deleteCustBlackListByIds(ids);
    }

    /**
     * 删除黑名单信息
     * 
     * @param id 黑名单主键
     * @return 结果
     */
    @Override
    public int deleteCustBlackListById(Long id)
    {
        return custBlackListMapper.deleteCustBlackListById(id);
    }
}
